package com.sales.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;

/**
 * Created by lihu on 2017/11/22.
 */
@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
public class WithdrawCashRecord {


    @Id
    @Column(length = 50)
    private String id;

    /**
     * 被提现账号
     */
    private String username;

    /**
     * 提现金额
     */
    private int amount;


    @CreatedBy
    @Column(insertable = false, updatable = false, columnDefinition = "TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3)")
    private Date addTime;

    @LastModifiedDate
    @Column(insertable = false, updatable = false, columnDefinition = "TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)")
    private Date updateTime;

}
